package shejimoshi.zhongjiezhemoshi;

public class client {
    public static void main(String[] args) {
        Mediator mediator = new ConcreteMediator();
        ConcreteColleagueA a = new ConcreteColleagueA("A", mediator);
        ConcreteColleagueB b = new ConcreteColleagueB("B", mediator);

        mediator.register("A", a);
        mediator.register("B", b);

        a.send("Hello B");
        b.send("Hi A");
    }
}
